package shiro.com.controller.sys;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import shiro.com.basie.controller.BaseController;
import shiro.com.basie.domain.AjaxResult;
import shiro.com.domain.sys.SysUsers;
import shiro.com.domain.TableDataInfo;
import shiro.com.service.sys.ISysUsersService;

import static shiro.com.basie.domain.AjaxResult.success;

/**
 * 【请填写功能名称】Controller
 *
 * @author ruoyi
 * @date 2022-11-06
 */
@CrossOrigin
@RestController
@RequestMapping("/system/users")
public class SysUsersController extends BaseController
{
    @Autowired
    private ISysUsersService sysUsersService;

    /**
     * 查询【请填写功能名称】列表
     */
    @GetMapping("/list")
    public TableDataInfo list(SysUsers sysUsers)
    {
        List<SysUsers> list = sysUsersService.selectSysUsersList(sysUsers);
        return getDataTable(list);
    }


//
//    /**
//     * 导出【请填写功能名称】列表
//     */
//    @PostMapping("/export")
//    public void export(HttpServletResponse response, SysUsers sysUsers)
//    {
//        List<SysUsers> list = sysUsersService.selectSysUsersList(sysUsers);
//        ExcelUtil<SysUsers> util = new ExcelUtil<SysUsers>(SysUsers.class);
//        util.exportExcel(response, list, "【请填写功能名称】数据");
//    }
//
    /**
     * 获取【请填写功能名称】详细信息
     */
    @GetMapping(value = "/{sysUserId}")
    public AjaxResult getInfo(@PathVariable("sysUserId") Long sysUserId)
    {
        return success(sysUsersService.selectSysUsersBySysUserId(sysUserId));
    }
//
//    /**
//     * 新增【请填写功能名称】
//     */
//    @PostMapping
//    public AjaxResult add(@RequestBody SysUsers sysUsers)
//    {
//        return toAjax(sysUsersService.insertSysUsers(sysUsers));
//    }
//
//    /**
//     * 修改【请填写功能名称】
//     */
//    @PreAuthorize("@ss.hasPermi('system:users:edit')")
//    @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
//    @PutMapping
//    public AjaxResult edit(@RequestBody SysUsers sysUsers)
//    {
//        return toAjax(sysUsersService.updateSysUsers(sysUsers));
//    }
//
//    /**
//     * 删除【请填写功能名称】
//     */
//    @PreAuthorize("@ss.hasPermi('system:users:remove')")
//    @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
//	@DeleteMapping("/{sysUserIds}")
//    public AjaxResult remove(@PathVariable Long[] sysUserIds)
//    {
//        return toAjax(sysUsersService.deleteSysUsersBySysUserIds(sysUserIds));
//    }
}
